<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="CittaEditDlg" widgetVar="CittaEditDialog" modal="true" resizable="false" appendToBody="true" header="#{myBundle.EditCittaTitle}" closeOnEscape="true">

            <h:form id="CittaEditForm">

                <h:panelGroup id="display">
                    <p:panelGrid  columns="2" rendered="#{cittaController.selected != null}">

                        <h:outputLabel value="#{myBundle.EditCittaLabel_cap}" for="cap" />
                        <h:outputText id="cap" value="#{cittaController.selected.cap}" />

                        <p:outputLabel value="#{myBundle.EditCittaLabel_nome}" for="nome" />
                        <p:inputText id="nome" value="#{cittaController.selected.nome}" title="#{myBundle.EditCittaTitle_nome}" required="true" requiredMessage="#{myBundle.EditCittaRequiredMessage_nome}" size="255" maxlength="255"/>

                        <p:outputLabel value="#{myBundle.EditCittaLabel_nazione}" for="nazione" />
                        <p:inputText id="nazione" value="#{cittaController.selected.nazione}" title="#{myBundle.EditCittaTitle_nazione}" required="true" requiredMessage="#{myBundle.EditCittaRequiredMessage_nazione}" size="45" maxlength="45"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{cittaController.save}" value="#{myBundle.Save}" update="display,:CittaListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,CittaEditDialog);"/>
                    <p:commandButton value="#{myBundle.Cancel}" onclick="CittaEditDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
